
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="css/screen.css" type="text/css">

</head>
<body>
<%-- <c:choose> --%>
<%-- 		<c:when test="${empty article}"> --%>
<!-- 			<p>Impossible de trouver l'article</p> -->
<%-- 		</c:when> --%>
<%-- 		<c:when test="${empty article.listeArticles }"> --%>
<%-- 			<h4>${article.titre}</h4> --%>
<!-- 			<p class="erreur">Ce article n'est pas disponible</p> -->
<%-- 		</c:when> --%>
<%-- 		<c:otherwise> --%>

	<c:if test="${not empty articleAjouter }">
		<label>Cet Article vient d'être ajouté : </label>${articleAjouter}
	</c:if>
	<table border="2">
		<tr align="center">
			<td width="200">Titre</td>
<!-- 			<td width="700">Resumé</td> -->
<!-- 			<td width="200">Anciennete</td> -->
<!-- 			<td width="200">Date de Sortie</td> -->
<!-- 			<td width="200">Tva</td> -->
			<td width="200">Categorie</td>
			<td width="200">Prix de vente</td>
			<td width="200">Stock</td>
			<td width="400">Details</td>
			<td width="400">Ajout</td>
			<c:if test="${not empty adminSession }">
			<td width="500">Action</td>
			</c:if>
			
		</tr>
		<c:forEach var="article" items="${listeArticles}">
			<tr align="left">
				<td><a href="AfficherPanier?id=${article.id}">${article.titre}</a></td>
<%-- 				<td>${article.resume}</td> --%>
<%-- 				<td>${article.anciennete.valeur}</td> --%>
<%-- 				<td>${article.anneeDeSortie}</td> --%>
<%-- 				<td>${article.tva.valeur}</td> --%>
				<td>${article.categorie.valeur}</td>
				<td>${article.prixVente}</td>
				<td>${article.stock}</td>
				
				<td align="center"><a href="DetailsArticle?action=details&id=${article.id}">Voir Details Article</a></td>			
				<td align="center"><a href="AfficherPanier?id=${article.id}">Ajouter Au Panier</a></td>
				<c:if test="${not empty adminSession }">
				<td><a href="SaisirArticle?action=modification&id=${article.id}">Modifier cet Article </a></td>
				</c:if>
			</tr>
		</c:forEach>
	</table>
	
	<input type="submit" class="btn btnPanier" onClick="location.replace('AfficherPanier')" value="Voir le panier" />
		
	<c:if test="${not empty adminSession}">
	<input type="button" class="btn btnSuivant" value="Saisir nouvel article"
	name="nouvel article" onclick="location.replace('SaisirArticle')" />
		</c:if>
<%-- 				</c:otherwise> --%>
<%-- 		</c:choose> --%>
		
</body>
</html>
